package com.pearadmin.system.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pearadmin.common.web.domain.request.PageDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pearadmin.system.mapper.ReportEvaluateAbilityRelevanceMapper;
import com.pearadmin.system.domain.ReportEvaluateAbilityRelevance;
import com.pearadmin.system.service.IReportEvaluateAbilityRelevanceService;

/**
 * 评价内容与学生能力相关性Service业务层处理
 * 
 * @author jmys
 * @date 2021-04-12
 */
@Service
public class ReportEvaluateAbilityRelevanceServiceImpl implements IReportEvaluateAbilityRelevanceService 
{
    @Autowired
    private ReportEvaluateAbilityRelevanceMapper reportEvaluateAbilityRelevanceMapper;

    /**
     * 查询评价内容与学生能力相关性
     * 
     * @param id 评价内容与学生能力相关性ID
     * @return 评价内容与学生能力相关性
     */
    @Override
    public ReportEvaluateAbilityRelevance selectReportEvaluateAbilityRelevanceById(Long id)
    {
        return reportEvaluateAbilityRelevanceMapper.selectReportEvaluateAbilityRelevanceById(id);
    }

    /**
     * 查询评价内容与学生能力相关性列表
     * 
     * @param reportEvaluateAbilityRelevance 评价内容与学生能力相关性
     * @return 评价内容与学生能力相关性
     */
    @Override
    public List<ReportEvaluateAbilityRelevance> selectReportEvaluateAbilityRelevanceList(ReportEvaluateAbilityRelevance reportEvaluateAbilityRelevance)
    {
        return reportEvaluateAbilityRelevanceMapper.selectReportEvaluateAbilityRelevanceList(reportEvaluateAbilityRelevance);
    }

    /**
     * 查询评价内容与学生能力相关性
     * @param reportEvaluateAbilityRelevance 评价内容与学生能力相关性
     * @param pageDomain
     * @return 评价内容与学生能力相关性 分页集合
     * */
    @Override
    public PageInfo<ReportEvaluateAbilityRelevance> selectReportEvaluateAbilityRelevancePage(ReportEvaluateAbilityRelevance reportEvaluateAbilityRelevance, PageDomain pageDomain)
    {
        PageHelper.startPage(pageDomain.getPage(),pageDomain.getLimit());
        List<ReportEvaluateAbilityRelevance> data = reportEvaluateAbilityRelevanceMapper.selectReportEvaluateAbilityRelevanceList(reportEvaluateAbilityRelevance);
        return new PageInfo<>(data);
    }

    /**
     * 新增评价内容与学生能力相关性
     * 
     * @param reportEvaluateAbilityRelevance 评价内容与学生能力相关性
     * @return 结果
     */

    @Override
    public int insertReportEvaluateAbilityRelevance(ReportEvaluateAbilityRelevance reportEvaluateAbilityRelevance)
    {
        return reportEvaluateAbilityRelevanceMapper.insertReportEvaluateAbilityRelevance(reportEvaluateAbilityRelevance);
    }

    /**
     * 修改评价内容与学生能力相关性
     * 
     * @param reportEvaluateAbilityRelevance 评价内容与学生能力相关性
     * @return 结果
     */
    @Override
    public int updateReportEvaluateAbilityRelevance(ReportEvaluateAbilityRelevance reportEvaluateAbilityRelevance)
    {
        return reportEvaluateAbilityRelevanceMapper.updateReportEvaluateAbilityRelevance(reportEvaluateAbilityRelevance);
    }

    /**
     * 删除评价内容与学生能力相关性对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteReportEvaluateAbilityRelevanceByIds(String[] ids)
    {
        return reportEvaluateAbilityRelevanceMapper.deleteReportEvaluateAbilityRelevanceByIds(ids);
    }

    /**
     * 删除评价内容与学生能力相关性信息
     * 
     * @param id 评价内容与学生能力相关性ID
     * @return 结果
     */
    @Override
    public int deleteReportEvaluateAbilityRelevanceById(Long id)
    {
        return reportEvaluateAbilityRelevanceMapper.deleteReportEvaluateAbilityRelevanceById(id);
    }
}
